package com.example.courier.mapper;

import com.example.courier.entity.Courier;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2025/9/6 10:40
 **/
@Mapper
public interface CourierMapper {

    @Insert("""
INSERT INTO ha_courier (courier_id, user_id, credit_score, is_available, total_earnings, create_time, update_time,
                        operator_id, is_delete)
VALUES (#{courierId}, #{userId}, #{creditScore}, #{isAvailable}, #{totalEarnings}, now(), now(), null, 0);
""")
    void saveCourier(Courier courier);
}
